package cn.javadog.smartbreeding.record.controller;

import cn.javadog.smartbreeding.core.service.AuthService;
import cn.javadog.smartbreeding.core.config.util.Ret;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 余勇
 */
@Api(tags = "鉴权")
@RestController
@RequestMapping("auth")
public class AuthController {

	@Autowired
	private AuthService authService;

	@ApiOperation("登陆")
	@GetMapping("login")
	public Ret login(String username, String password) {
		return Ret.ok(authService.login(username,password));
	}
}
